<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::CPCSegmentation&lt; PointT &gt;::WeightedRandomSampleConsensus类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="#pri-types">Private 类型</a> &#124;
<a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::CPCSegmentation&lt; PointT &gt;::WeightedRandomSampleConsensus类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><b><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html" title="WeightedRandomSampleConsensus represents an implementation of the Directionally Weighted RANSAC algor...">WeightedRandomSampleConsensus</a></b> represents an implementation of the Directionally Weighted RANSAC algorithm, as described in: "Constrained Planar Cuts - Part Segmentation for Point Clouds", CVPR 2015, M. Schoeler, J. Papon, F. Wörgötter.  
 <a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#details">更多...</a></p>
<div class="dynheader">
类 pcl::CPCSegmentation&lt; PointT &gt;::WeightedRandomSampleConsensus 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.png" usemap="#pcl::CPCSegmentation_3C_20PointT_20_3E::WeightedRandomSampleConsensus_map" alt=""/>
  <map id="pcl::CPCSegmentation_3C_20PointT_20_3E::WeightedRandomSampleConsensus_map" name="pcl::CPCSegmentation_3C_20PointT_20_3E::WeightedRandomSampleConsensus_map">
<area href="classpcl_1_1_sample_consensus.html" alt="pcl::SampleConsensus&lt; WeightSACPointType &gt;" shape="rect" coords="0,0,401,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a87cab50ed9f9b9a2b6f66dbfe7ccfd53"><td class="memItemLeft" align="right" valign="top"><a id="a87cab50ed9f9b9a2b6f66dbfe7ccfd53"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html">WeightedRandomSampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:a87cab50ed9f9b9a2b6f66dbfe7ccfd53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac208f7542a433d44b56c68c752010830"><td class="memItemLeft" align="right" valign="top"><a id="ac208f7542a433d44b56c68c752010830"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html">WeightedRandomSampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:ac208f7542a433d44b56c68c752010830"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classpcl_1_1_sample_consensus"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classpcl_1_1_sample_consensus')"><img src="closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus&lt; WeightSACPointType &gt;</a></td></tr>
<tr class="memitem:aaf12b77bbf0507ff0c7e28e4844d894f inherit pub_types_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aaf12b77bbf0507ff0c7e28e4844d894f"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:aaf12b77bbf0507ff0c7e28e4844d894f inherit pub_types_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfd144d2c057d7b997877d5cce90c5a5 inherit pub_types_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="abfd144d2c057d7b997877d5cce90c5a5"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:abfd144d2c057d7b997877d5cce90c5a5 inherit pub_types_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a49f312ddf01f8ffee1efeb3374b2eef7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a49f312ddf01f8ffee1efeb3374b2eef7">WeightedRandomSampleConsensus</a> (const SampleConsensusModelPtr &amp;model, bool random=false)</td></tr>
<tr class="memdesc:a49f312ddf01f8ffee1efeb3374b2eef7"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html" title="WeightedRandomSampleConsensus represents an implementation of the Directionally Weighted RANSAC algor...">WeightedRandomSampleConsensus</a> (Weighted RAndom SAmple Consensus) main constructor  <a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a49f312ddf01f8ffee1efeb3374b2eef7">更多...</a><br /></td></tr>
<tr class="separator:a49f312ddf01f8ffee1efeb3374b2eef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a724b2439427951d9e96688341e263761"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a724b2439427951d9e96688341e263761">WeightedRandomSampleConsensus</a> (const SampleConsensusModelPtr &amp;model, double threshold, bool random=false)</td></tr>
<tr class="memdesc:a724b2439427951d9e96688341e263761"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html" title="WeightedRandomSampleConsensus represents an implementation of the Directionally Weighted RANSAC algor...">WeightedRandomSampleConsensus</a> (Weighted RAndom SAmple Consensus) main constructor  <a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a724b2439427951d9e96688341e263761">更多...</a><br /></td></tr>
<tr class="separator:a724b2439427951d9e96688341e263761"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa2dc352bd71e275a23de67ac522974f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aaa2dc352bd71e275a23de67ac522974f">computeModel</a> (int debug_verbosity_level=0)</td></tr>
<tr class="memdesc:aaa2dc352bd71e275a23de67ac522974f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the actual model and find the inliers  <a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aaa2dc352bd71e275a23de67ac522974f">更多...</a><br /></td></tr>
<tr class="separator:aaa2dc352bd71e275a23de67ac522974f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6313e39510545b961cfbed0373b7bbde"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a6313e39510545b961cfbed0373b7bbde">setWeights</a> (const std::vector&lt; double &gt; &amp;weights, const bool directed_weights=false)</td></tr>
<tr class="memdesc:a6313e39510545b961cfbed0373b7bbde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the weights for the input points  <a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a6313e39510545b961cfbed0373b7bbde">更多...</a><br /></td></tr>
<tr class="separator:a6313e39510545b961cfbed0373b7bbde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a291239e9d29732e29919adc43f7ace"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a5a291239e9d29732e29919adc43f7ace">getBestScore</a> () const</td></tr>
<tr class="memdesc:a5a291239e9d29732e29919adc43f7ace"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the best score  <a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a5a291239e9d29732e29919adc43f7ace">更多...</a><br /></td></tr>
<tr class="separator:a5a291239e9d29732e29919adc43f7ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classpcl_1_1_sample_consensus"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classpcl_1_1_sample_consensus')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus&lt; WeightSACPointType &gt;</a></td></tr>
<tr class="memitem:aee8d85e0b1062f5e18d43609e6ac59bf inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aee8d85e0b1062f5e18d43609e6ac59bf">SampleConsensus</a> (const SampleConsensusModelPtr &amp;model, bool random=false)</td></tr>
<tr class="memdesc:aee8d85e0b1062f5e18d43609e6ac59bf inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for base SAC.  <a href="classpcl_1_1_sample_consensus.html#aee8d85e0b1062f5e18d43609e6ac59bf">更多...</a><br /></td></tr>
<tr class="separator:aee8d85e0b1062f5e18d43609e6ac59bf inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac4937e9bc2a8acf15ae97c7d763090a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aac4937e9bc2a8acf15ae97c7d763090a">SampleConsensus</a> (const SampleConsensusModelPtr &amp;model, double threshold, bool random=false)</td></tr>
<tr class="memdesc:aac4937e9bc2a8acf15ae97c7d763090a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for base SAC.  <a href="classpcl_1_1_sample_consensus.html#aac4937e9bc2a8acf15ae97c7d763090a">更多...</a><br /></td></tr>
<tr class="separator:aac4937e9bc2a8acf15ae97c7d763090a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca6f09bf3c664bfed2ae36e81909e9f2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aca6f09bf3c664bfed2ae36e81909e9f2">setSampleConsensusModel</a> (const SampleConsensusModelPtr &amp;model)</td></tr>
<tr class="memdesc:aca6f09bf3c664bfed2ae36e81909e9f2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Sample Consensus model to use.  <a href="classpcl_1_1_sample_consensus.html#aca6f09bf3c664bfed2ae36e81909e9f2">更多...</a><br /></td></tr>
<tr class="separator:aca6f09bf3c664bfed2ae36e81909e9f2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a101dfdcc9098f463db135a7655a438 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a1a101dfdcc9098f463db135a7655a438"></a>
SampleConsensusModelPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a1a101dfdcc9098f463db135a7655a438">getSampleConsensusModel</a> () const</td></tr>
<tr class="memdesc:a1a101dfdcc9098f463db135a7655a438 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the Sample Consensus model used. <br /></td></tr>
<tr class="separator:a1a101dfdcc9098f463db135a7655a438 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a138ae225b2d724491a7abdfcfd2b4de5 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a138ae225b2d724491a7abdfcfd2b4de5"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a138ae225b2d724491a7abdfcfd2b4de5">~SampleConsensus</a> ()</td></tr>
<tr class="memdesc:a138ae225b2d724491a7abdfcfd2b4de5 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor for base SAC. <br /></td></tr>
<tr class="separator:a138ae225b2d724491a7abdfcfd2b4de5 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1a06ccc992dfc9e65e70f5876f3c8d3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ae1a06ccc992dfc9e65e70f5876f3c8d3">setDistanceThreshold</a> (double threshold)</td></tr>
<tr class="memdesc:ae1a06ccc992dfc9e65e70f5876f3c8d3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the distance to model threshold.  <a href="classpcl_1_1_sample_consensus.html#ae1a06ccc992dfc9e65e70f5876f3c8d3">更多...</a><br /></td></tr>
<tr class="separator:ae1a06ccc992dfc9e65e70f5876f3c8d3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a575ab4a3facfdc8e007f427a96798d7d inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a575ab4a3facfdc8e007f427a96798d7d"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a575ab4a3facfdc8e007f427a96798d7d">getDistanceThreshold</a> ()</td></tr>
<tr class="memdesc:a575ab4a3facfdc8e007f427a96798d7d inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the distance to model threshold, as set by the user. <br /></td></tr>
<tr class="separator:a575ab4a3facfdc8e007f427a96798d7d inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8558bc2462b6da4a2f88b2efc1ad571 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#af8558bc2462b6da4a2f88b2efc1ad571">setMaxIterations</a> (int max_iterations)</td></tr>
<tr class="memdesc:af8558bc2462b6da4a2f88b2efc1ad571 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the maximum number of iterations.  <a href="classpcl_1_1_sample_consensus.html#af8558bc2462b6da4a2f88b2efc1ad571">更多...</a><br /></td></tr>
<tr class="separator:af8558bc2462b6da4a2f88b2efc1ad571 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5c7f23a52dc184d8cc56790d63d375a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aa5c7f23a52dc184d8cc56790d63d375a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa5c7f23a52dc184d8cc56790d63d375a">getMaxIterations</a> ()</td></tr>
<tr class="memdesc:aa5c7f23a52dc184d8cc56790d63d375a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the maximum number of iterations, as set by the user. <br /></td></tr>
<tr class="separator:aa5c7f23a52dc184d8cc56790d63d375a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd6b8031622746d8b6aada91ffbaa7ee inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#acd6b8031622746d8b6aada91ffbaa7ee">setProbability</a> (double probability)</td></tr>
<tr class="memdesc:acd6b8031622746d8b6aada91ffbaa7ee inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the desired probability of choosing at least one sample free from outliers.  <a href="classpcl_1_1_sample_consensus.html#acd6b8031622746d8b6aada91ffbaa7ee">更多...</a><br /></td></tr>
<tr class="separator:acd6b8031622746d8b6aada91ffbaa7ee inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afafb66faf0cbfa464cd884127bafdac3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="afafb66faf0cbfa464cd884127bafdac3"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#afafb66faf0cbfa464cd884127bafdac3">getProbability</a> ()</td></tr>
<tr class="memdesc:afafb66faf0cbfa464cd884127bafdac3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain the probability of choosing at least one sample free from outliers, as set by the user. <br /></td></tr>
<tr class="separator:afafb66faf0cbfa464cd884127bafdac3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7c059e9ee5b5180bb7fb02b0d947c36 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#af7c059e9ee5b5180bb7fb02b0d947c36">refineModel</a> (const double sigma=3.0, const unsigned int max_iterations=1000)</td></tr>
<tr class="memdesc:af7c059e9ee5b5180bb7fb02b0d947c36 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Refine the model found. This loops over the model coefficients and optimizes them together with the set of inliers, until the change in the set of inliers is minimal.  <a href="classpcl_1_1_sample_consensus.html#af7c059e9ee5b5180bb7fb02b0d947c36">更多...</a><br /></td></tr>
<tr class="separator:af7c059e9ee5b5180bb7fb02b0d947c36 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56b0649ebe9cd4b8a48442f864f5e83c inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a56b0649ebe9cd4b8a48442f864f5e83c">getRandomSamples</a> (const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, size_t nr_samples, std::set&lt; int &gt; &amp;indices_subset)</td></tr>
<tr class="memdesc:a56b0649ebe9cd4b8a48442f864f5e83c inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a set of randomly selected indices.  <a href="classpcl_1_1_sample_consensus.html#a56b0649ebe9cd4b8a48442f864f5e83c">更多...</a><br /></td></tr>
<tr class="separator:a56b0649ebe9cd4b8a48442f864f5e83c inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae09f01cda7605910955b0aee847ea849 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ae09f01cda7605910955b0aee847ea849">getModel</a> (std::vector&lt; int &gt; &amp;model)</td></tr>
<tr class="memdesc:ae09f01cda7605910955b0aee847ea849 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the best model found so far.  <a href="classpcl_1_1_sample_consensus.html#ae09f01cda7605910955b0aee847ea849">更多...</a><br /></td></tr>
<tr class="separator:ae09f01cda7605910955b0aee847ea849 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ac2013afb3a2feaaeb661f3aa3ccf6b inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a7ac2013afb3a2feaaeb661f3aa3ccf6b">getInliers</a> (std::vector&lt; int &gt; &amp;inliers)</td></tr>
<tr class="memdesc:a7ac2013afb3a2feaaeb661f3aa3ccf6b inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the best set of inliers found so far for this model.  <a href="classpcl_1_1_sample_consensus.html#a7ac2013afb3a2feaaeb661f3aa3ccf6b">更多...</a><br /></td></tr>
<tr class="separator:a7ac2013afb3a2feaaeb661f3aa3ccf6b inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f55f89ee72539f66f7edc8bcf6ce0c2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a9f55f89ee72539f66f7edc8bcf6ce0c2">getModelCoefficients</a> (Eigen::VectorXf &amp;model_coefficients)</td></tr>
<tr class="memdesc:a9f55f89ee72539f66f7edc8bcf6ce0c2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the model coefficients of the best model found so far.  <a href="classpcl_1_1_sample_consensus.html#a9f55f89ee72539f66f7edc8bcf6ce0c2">更多...</a><br /></td></tr>
<tr class="separator:a9f55f89ee72539f66f7edc8bcf6ce0c2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a617804fa3f1e32afe3f755d54e03ee98"><td class="memItemLeft" align="right" valign="top"><a id="a617804fa3f1e32afe3f755d54e03ee98"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a617804fa3f1e32afe3f755d54e03ee98">initialize</a> ()</td></tr>
<tr class="memdesc:a617804fa3f1e32afe3f755d54e03ee98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the model parameters. Called by the constructors. <br /></td></tr>
<tr class="separator:a617804fa3f1e32afe3f755d54e03ee98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classpcl_1_1_sample_consensus"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classpcl_1_1_sample_consensus')"><img src="closed.png" alt="-"/>&#160;Protected 成员函数 继承自 <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus&lt; WeightSACPointType &gt;</a></td></tr>
<tr class="memitem:a7a731d68a379a0a6442deae93e85d3a8 inherit pro_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a7a731d68a379a0a6442deae93e85d3a8"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a7a731d68a379a0a6442deae93e85d3a8">rnd</a> ()</td></tr>
<tr class="memdesc:a7a731d68a379a0a6442deae93e85d3a8 inherit pro_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator. <br /></td></tr>
<tr class="separator:a7a731d68a379a0a6442deae93e85d3a8 inherit pro_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:afdf74f8e57d514108d59d16829b5b446"><td class="memItemLeft" align="right" valign="top"><a id="afdf74f8e57d514108d59d16829b5b446"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#afdf74f8e57d514108d59d16829b5b446">use_directed_weights_</a></td></tr>
<tr class="memdesc:afdf74f8e57d514108d59d16829b5b446"><td class="mdescLeft">&#160;</td><td class="mdescRight">weight each positive weight point by the inner product between the normal and the plane normal <br /></td></tr>
<tr class="separator:afdf74f8e57d514108d59d16829b5b446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f272fa6787532bbe7a7f14ef40f79d6"><td class="memItemLeft" align="right" valign="top"><a id="a5f272fa6787532bbe7a7f14ef40f79d6"></a>
std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a5f272fa6787532bbe7a7f14ef40f79d6">weights_</a></td></tr>
<tr class="memdesc:a5f272fa6787532bbe7a7f14ef40f79d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">vector of weights assigned to points. Set by the setWeights-method <br /></td></tr>
<tr class="separator:a5f272fa6787532bbe7a7f14ef40f79d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a690b982ca4e9efbc8cc8bfd1954db4dc"><td class="memItemLeft" align="right" valign="top"><a id="a690b982ca4e9efbc8cc8bfd1954db4dc"></a>
boost::shared_ptr&lt; std::vector&lt; int &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a690b982ca4e9efbc8cc8bfd1954db4dc">model_pt_indices_</a></td></tr>
<tr class="memdesc:a690b982ca4e9efbc8cc8bfd1954db4dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">The indices used for estimating the RANSAC model. Only those whose weight is &gt; 0 <br /></td></tr>
<tr class="separator:a690b982ca4e9efbc8cc8bfd1954db4dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8f5af30b240aa1d7c21082ef2f84ed7"><td class="memItemLeft" align="right" valign="top"><a id="ac8f5af30b240aa1d7c21082ef2f84ed7"></a>
boost::shared_ptr&lt; std::vector&lt; int &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#ac8f5af30b240aa1d7c21082ef2f84ed7">full_cloud_pt_indices_</a></td></tr>
<tr class="memdesc:ac8f5af30b240aa1d7c21082ef2f84ed7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The complete list of indices used for the model evaluation <br /></td></tr>
<tr class="separator:ac8f5af30b240aa1d7c21082ef2f84ed7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab06480ee4efa1545f1fbf84ff58a5eca"><td class="memItemLeft" align="right" valign="top"><a id="ab06480ee4efa1545f1fbf84ff58a5eca"></a>
boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_i_normal.html">WeightSACPointType</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#ab06480ee4efa1545f1fbf84ff58a5eca">point_cloud_ptr_</a></td></tr>
<tr class="memdesc:ab06480ee4efa1545f1fbf84ff58a5eca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the input <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a> <br /></td></tr>
<tr class="separator:ab06480ee4efa1545f1fbf84ff58a5eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff0d5c9c04a5d9dee5b66f44c04303ec"><td class="memItemLeft" align="right" valign="top"><a id="aff0d5c9c04a5d9dee5b66f44c04303ec"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aff0d5c9c04a5d9dee5b66f44c04303ec">best_score_</a></td></tr>
<tr class="memdesc:aff0d5c9c04a5d9dee5b66f44c04303ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Highest score found so far <br /></td></tr>
<tr class="separator:aff0d5c9c04a5d9dee5b66f44c04303ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classpcl_1_1_sample_consensus"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classpcl_1_1_sample_consensus')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus&lt; WeightSACPointType &gt;</a></td></tr>
<tr class="memitem:aa4953d080c1ab4223cde8ff8d8cabc52 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aa4953d080c1ab4223cde8ff8d8cabc52"></a>
SampleConsensusModelPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a></td></tr>
<tr class="memdesc:aa4953d080c1ab4223cde8ff8d8cabc52 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The underlying data model used (i.e. what is it that we attempt to search for). <br /></td></tr>
<tr class="separator:aa4953d080c1ab4223cde8ff8d8cabc52 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e04da16522ae180cb8cc2e6ef0d2244 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a0e04da16522ae180cb8cc2e6ef0d2244"></a>
std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a></td></tr>
<tr class="memdesc:a0e04da16522ae180cb8cc2e6ef0d2244 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The model found after the last computeModel () as point cloud indices. <br /></td></tr>
<tr class="separator:a0e04da16522ae180cb8cc2e6ef0d2244 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0115926eadf78f7bc1ad4675659d8343 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a0115926eadf78f7bc1ad4675659d8343"></a>
std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a></td></tr>
<tr class="memdesc:a0115926eadf78f7bc1ad4675659d8343 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The indices of the points that were chosen as inliers after the last computeModel () call. <br /></td></tr>
<tr class="separator:a0115926eadf78f7bc1ad4675659d8343 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96f852dfca500689684313d3cb7f84b1 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a96f852dfca500689684313d3cb7f84b1"></a>
Eigen::VectorXf&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a></td></tr>
<tr class="memdesc:a96f852dfca500689684313d3cb7f84b1 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The coefficients of our model computed directly from the model found. <br /></td></tr>
<tr class="separator:a96f852dfca500689684313d3cb7f84b1 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a025913cc2a2099a553fe7842aa792326 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a025913cc2a2099a553fe7842aa792326"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">probability_</a></td></tr>
<tr class="memdesc:a025913cc2a2099a553fe7842aa792326 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Desired probability of choosing at least one sample free from outliers. <br /></td></tr>
<tr class="separator:a025913cc2a2099a553fe7842aa792326 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a471e062f42e9cb4ae9d77107cc135acb inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a471e062f42e9cb4ae9d77107cc135acb"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a></td></tr>
<tr class="memdesc:a471e062f42e9cb4ae9d77107cc135acb inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total number of internal loop iterations that we've done so far. <br /></td></tr>
<tr class="separator:a471e062f42e9cb4ae9d77107cc135acb inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1c52d7d8be8f058feac1f9241bf305e inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aa1c52d7d8be8f058feac1f9241bf305e"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a></td></tr>
<tr class="memdesc:aa1c52d7d8be8f058feac1f9241bf305e inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Distance to model threshold. <br /></td></tr>
<tr class="separator:aa1c52d7d8be8f058feac1f9241bf305e inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a></td></tr>
<tr class="memdesc:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of iterations before giving up. <br /></td></tr>
<tr class="separator:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3860965324830148970ba99223663aa2 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a3860965324830148970ba99223663aa2"></a>
boost::mt19937&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a3860965324830148970ba99223663aa2">rng_alg_</a></td></tr>
<tr class="memdesc:a3860965324830148970ba99223663aa2 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator algorithm. <br /></td></tr>
<tr class="separator:a3860965324830148970ba99223663aa2 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa23f804b4957312659adca2068e05682 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aa23f804b4957312659adca2068e05682"></a>
boost::shared_ptr&lt; boost::uniform_01&lt; boost::mt19937 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a></td></tr>
<tr class="memdesc:aa23f804b4957312659adca2068e05682 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator distribution. <br /></td></tr>
<tr class="separator:aa23f804b4957312659adca2068e05682 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private 类型</h2></td></tr>
<tr class="memitem:a8451c414169828ab24d067d4cf301afc"><td class="memItemLeft" align="right" valign="top"><a id="a8451c414169828ab24d067d4cf301afc"></a>
typedef <a class="el" href="classpcl_1_1_sample_consensus_model.html">SampleConsensusModel</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_i_normal.html">WeightSACPointType</a> &gt;::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>SampleConsensusModelPtr</b></td></tr>
<tr class="separator:a8451c414169828ab24d067d4cf301afc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointT&gt;<br />
class pcl::CPCSegmentation&lt; PointT &gt;::WeightedRandomSampleConsensus</h3>

<p><b><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html" title="WeightedRandomSampleConsensus represents an implementation of the Directionally Weighted RANSAC algor...">WeightedRandomSampleConsensus</a></b> represents an implementation of the Directionally Weighted RANSAC algorithm, as described in: "Constrained Planar Cuts - Part Segmentation for Point Clouds", CVPR 2015, M. Schoeler, J. Papon, F. Wörgötter. </p>
<dl class="section note"><dt>注解</dt><dd>It only uses points with a weight &gt; 0 for the model calculation, but uses all points for the evaluation (scoring of the model) Only use in conjunction with sac_model_plane If you use this in a scientific work please cite the following paper: M. Schoeler, J. Papon, F. Woergoetter Constrained Planar Cuts - <a class="el" href="class_object.html">Object</a> Partitioning for Point Clouds In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2015 </dd></dl>
<dl class="section author"><dt>作者</dt><dd>Markus Schoeler (<a href="#" onclick="location.href='mai'+'lto:'+'msc'+'ho'+'ele'+'r@'+'web'+'.d'+'e'; return false;">mscho<span style="display: none;">.nosp@m.</span>eler<span style="display: none;">.nosp@m.</span>@web.<span style="display: none;">.nosp@m.</span>de</a>) </dd></dl>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a49f312ddf01f8ffee1efeb3374b2eef7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49f312ddf01f8ffee1efeb3374b2eef7">&#9670;&nbsp;</a></span>WeightedRandomSampleConsensus() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpcl_1_1_c_p_c_segmentation.html">pcl::CPCSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::WeightedRandomSampleConsensus::WeightedRandomSampleConsensus </td>
          <td>(</td>
          <td class="paramtype">const SampleConsensusModelPtr &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>random</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html" title="WeightedRandomSampleConsensus represents an implementation of the Directionally Weighted RANSAC algor...">WeightedRandomSampleConsensus</a> (Weighted RAndom SAmple Consensus) main constructor </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>a Sample Consensus model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">random</td><td>if true set the random seed to the current time, else set to 12345 (default: false) </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            : SampleConsensus&lt;WeightSACPointType&gt; (model, random)</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;          {</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;            <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a617804fa3f1e32afe3f755d54e03ee98">initialize</a> ();</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;          }</div>
<div class="ttc" id="aclasspcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus_html_a617804fa3f1e32afe3f755d54e03ee98"><div class="ttname"><a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a617804fa3f1e32afe3f755d54e03ee98">pcl::CPCSegmentation::WeightedRandomSampleConsensus::initialize</a></div><div class="ttdeci">void initialize()</div><div class="ttdoc">Initialize the model parameters. Called by the constructors.</div><div class="ttdef"><b>Definition:</b> cpc_segmentation.h:248</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a724b2439427951d9e96688341e263761"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a724b2439427951d9e96688341e263761">&#9670;&nbsp;</a></span>WeightedRandomSampleConsensus() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpcl_1_1_c_p_c_segmentation.html">pcl::CPCSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::WeightedRandomSampleConsensus::WeightedRandomSampleConsensus </td>
          <td>(</td>
          <td class="paramtype">const SampleConsensusModelPtr &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>threshold</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>random</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html" title="WeightedRandomSampleConsensus represents an implementation of the Directionally Weighted RANSAC algor...">WeightedRandomSampleConsensus</a> (Weighted RAndom SAmple Consensus) main constructor </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>a Sample Consensus model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">threshold</td><td>distance to model threshold </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">random</td><td>if true set the random seed to the current time, else set to 12345 (default: false) </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            : SampleConsensus&lt;WeightSACPointType&gt; (model, threshold, random)</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;          {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;            <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a617804fa3f1e32afe3f755d54e03ee98">initialize</a> ();</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;          }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="aaa2dc352bd71e275a23de67ac522974f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa2dc352bd71e275a23de67ac522974f">&#9670;&nbsp;</a></span>computeModel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classpcl_1_1_c_p_c_segmentation.html">pcl::CPCSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::WeightedRandomSampleConsensus::computeModel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>debug_verbosity_level</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the actual model and find the inliers </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">debug_verbosity_level</td><td>enable/disable on-screen debug information and set the verbosity level </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="classpcl_1_1_sample_consensus.html#a6bb9db27c2f0226aaa1e0c2af2b3439e">pcl::SampleConsensus&lt; WeightSACPointType &gt;</a>.</p>
<div class="fragment"><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;{</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;  <span class="comment">// Warn and exit if no threshold was set</span></div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a> == std::numeric_limits&lt;double&gt;::max ())</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  {</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    PCL_ERROR (<span class="stringliteral">&quot;[pcl::CPCSegmentation&lt;PointT&gt;::WeightedRandomSampleConsensus::computeModel] No threshold set!\n&quot;</span>);</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;  }</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160; </div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;  <a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a> = 0;</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;  <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aff0d5c9c04a5d9dee5b66f44c04303ec">best_score_</a> = -std::numeric_limits&lt;double&gt;::max ();</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160; </div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;  std::vector&lt;int&gt; selection;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;  Eigen::VectorXf model_coefficients;</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160; </div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;  <span class="keywordtype">unsigned</span> skipped_count = 0;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;  <span class="comment">// supress infinite loops by just allowing 10 x maximum allowed iterations for invalid model parameters!</span></div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> max_skip = <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a> * 10;</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160; </div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;  <span class="comment">// Iterate</span></div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;  <span class="keywordflow">while</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a> &lt; <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a> &amp;&amp; skipped_count &lt; max_skip)</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;  {</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    <span class="comment">// Get X samples which satisfy the model criteria and which have a weight &gt; 0</span></div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;setIndices (<a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a690b982ca4e9efbc8cc8bfd1954db4dc">model_pt_indices_</a>);</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getSamples (<a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a>, selection);</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160; </div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    <span class="keywordflow">if</span> (selection.empty ())</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    {</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;      PCL_ERROR (<span class="stringliteral">&quot;[pcl::CPCSegmentation&lt;PointT&gt;::WeightedRandomSampleConsensus::computeModel] No samples could be selected!\n&quot;</span>);</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;      <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    }</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160; </div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    <span class="comment">// Search for inliers in the point cloud for the current plane model M</span></div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;computeModelCoefficients (selection, model_coefficients))</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    {</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;      <span class="comment">//++iterations_;</span></div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;      ++skipped_count;</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;      <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    }</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;    <span class="comment">// weight distances to get the score (only using connected inliers)</span></div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;setIndices (<a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#ac8f5af30b240aa1d7c21082ef2f84ed7">full_cloud_pt_indices_</a>);</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160; </div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    boost::shared_ptr&lt;std::vector&lt;int&gt; &gt; current_inliers (<span class="keyword">new</span> std::vector&lt;int&gt;);</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;selectWithinDistance (model_coefficients, <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a>, *current_inliers);</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    <span class="keywordtype">double</span> current_score = 0;</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    Eigen::Vector3f plane_normal (model_coefficients[0], model_coefficients[1], model_coefficients[2]);</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; current_inliers-&gt;size (); ++i)</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    {</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;      <span class="keywordtype">int</span> current_index = current_inliers-&gt;at (i);</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;      <span class="keywordtype">double</span> index_score;</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;      <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#afdf74f8e57d514108d59d16829b5b446">use_directed_weights_</a>)</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;        <span class="comment">// the sqrt(2) factor was used in the paper and was meant for making the scores better comparable between directed and undirected weights</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        index_score = <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a5f272fa6787532bbe7a7f14ef40f79d6">weights_</a>[current_index] * 1.414 * (fabsf (plane_normal.dot (<a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#ab06480ee4efa1545f1fbf84ff58a5eca">point_cloud_ptr_</a>-&gt;at (current_index).getNormalVector3fMap ())));</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;      <span class="keywordflow">else</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        index_score = <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a5f272fa6787532bbe7a7f14ef40f79d6">weights_</a>[current_index];</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160; </div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;      current_score += index_score;</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;    }</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    <span class="comment">// normalize by the total number of inliers</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    current_score = current_score * 1.0 / current_inliers-&gt;size ();</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    </div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    <span class="comment">// Better match ?</span></div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    <span class="keywordflow">if</span> (current_score &gt; <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aff0d5c9c04a5d9dee5b66f44c04303ec">best_score_</a>)</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    {</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;      <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aff0d5c9c04a5d9dee5b66f44c04303ec">best_score_</a> = current_score;</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;      <span class="comment">// Save the current model/inlier/coefficients selection as being the best so far</span></div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;      <a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a> = selection;</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;      <a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a> = model_coefficients;</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;    }</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160; </div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    ++<a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a>;</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    PCL_DEBUG (<span class="stringliteral">&quot;[pcl::CPCSegmentation&lt;PointT&gt;::WeightedRandomSampleConsensus::computeModel] Trial %d (max %d): score is %f (best is: %f so far).\n&quot;</span>, <a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a>, <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a>, current_score, <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aff0d5c9c04a5d9dee5b66f44c04303ec">best_score_</a>);</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a> &gt; <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a>)</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    {</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;      PCL_DEBUG (<span class="stringliteral">&quot;[pcl::CPCSegmentation&lt;PointT&gt;::WeightedRandomSampleConsensus::computeModel] RANSAC reached the maximum number of trials.\n&quot;</span>);</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;      <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    }</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;  }</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;<span class="comment">//   std::cout &lt;&lt; &quot;Took us &quot; &lt;&lt; iterations_ - 1 &lt;&lt; &quot; iterations&quot; &lt;&lt; std::endl;</span></div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;  PCL_DEBUG (<span class="stringliteral">&quot;[pcl::CPCSegmentation&lt;PointT&gt;::WeightedRandomSampleConsensus::computeModel] Model: %lu size, %f score.\n&quot;</span>, <a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a>.size (), <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aff0d5c9c04a5d9dee5b66f44c04303ec">best_score_</a>);</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160; </div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a>.empty ())</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;  {</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a>.clear ();</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;  }</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160; </div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;  <span class="comment">// Get the set of inliers that correspond to the best model found so far</span></div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;  <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;selectWithinDistance (<a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a>, <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a>, <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a>);</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus_html_a5f272fa6787532bbe7a7f14ef40f79d6"><div class="ttname"><a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a5f272fa6787532bbe7a7f14ef40f79d6">pcl::CPCSegmentation::WeightedRandomSampleConsensus::weights_</a></div><div class="ttdeci">std::vector&lt; double &gt; weights_</div><div class="ttdoc">vector of weights assigned to points. Set by the setWeights-method</div><div class="ttdef"><b>Definition:</b> cpc_segmentation.h:262</div></div>
<div class="ttc" id="aclasspcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus_html_a690b982ca4e9efbc8cc8bfd1954db4dc"><div class="ttname"><a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a690b982ca4e9efbc8cc8bfd1954db4dc">pcl::CPCSegmentation::WeightedRandomSampleConsensus::model_pt_indices_</a></div><div class="ttdeci">boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; model_pt_indices_</div><div class="ttdoc">The indices used for estimating the RANSAC model. Only those whose weight is &gt; 0</div><div class="ttdef"><b>Definition:</b> cpc_segmentation.h:265</div></div>
<div class="ttc" id="aclasspcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus_html_ab06480ee4efa1545f1fbf84ff58a5eca"><div class="ttname"><a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#ab06480ee4efa1545f1fbf84ff58a5eca">pcl::CPCSegmentation::WeightedRandomSampleConsensus::point_cloud_ptr_</a></div><div class="ttdeci">boost::shared_ptr&lt; const pcl::PointCloud&lt; WeightSACPointType &gt; &gt; point_cloud_ptr_</div><div class="ttdoc">Pointer to the input PointCloud</div><div class="ttdef"><b>Definition:</b> cpc_segmentation.h:271</div></div>
<div class="ttc" id="aclasspcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus_html_ac8f5af30b240aa1d7c21082ef2f84ed7"><div class="ttname"><a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#ac8f5af30b240aa1d7c21082ef2f84ed7">pcl::CPCSegmentation::WeightedRandomSampleConsensus::full_cloud_pt_indices_</a></div><div class="ttdeci">boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; full_cloud_pt_indices_</div><div class="ttdoc">The complete list of indices used for the model evaluation</div><div class="ttdef"><b>Definition:</b> cpc_segmentation.h:268</div></div>
<div class="ttc" id="aclasspcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus_html_afdf74f8e57d514108d59d16829b5b446"><div class="ttname"><a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#afdf74f8e57d514108d59d16829b5b446">pcl::CPCSegmentation::WeightedRandomSampleConsensus::use_directed_weights_</a></div><div class="ttdeci">bool use_directed_weights_</div><div class="ttdoc">weight each positive weight point by the inner product between the normal and the plane normal</div><div class="ttdef"><b>Definition:</b> cpc_segmentation.h:259</div></div>
<div class="ttc" id="aclasspcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus_html_aff0d5c9c04a5d9dee5b66f44c04303ec"><div class="ttname"><a href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aff0d5c9c04a5d9dee5b66f44c04303ec">pcl::CPCSegmentation::WeightedRandomSampleConsensus::best_score_</a></div><div class="ttdeci">double best_score_</div><div class="ttdoc">Highest score found so far</div><div class="ttdef"><b>Definition:</b> cpc_segmentation.h:274</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a0115926eadf78f7bc1ad4675659d8343"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">pcl::SampleConsensus&lt; WeightSACPointType &gt;::inliers_</a></div><div class="ttdeci">std::vector&lt; int &gt; inliers_</div><div class="ttdoc">The indices of the points that were chosen as inliers after the last computeModel () call.</div><div class="ttdef"><b>Definition:</b> sac.h:316</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a0e04da16522ae180cb8cc2e6ef0d2244"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">pcl::SampleConsensus&lt; WeightSACPointType &gt;::model_</a></div><div class="ttdeci">std::vector&lt; int &gt; model_</div><div class="ttdoc">The model found after the last computeModel () as point cloud indices.</div><div class="ttdef"><b>Definition:</b> sac.h:313</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a471e062f42e9cb4ae9d77107cc135acb"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">pcl::SampleConsensus&lt; WeightSACPointType &gt;::iterations_</a></div><div class="ttdeci">int iterations_</div><div class="ttdoc">Total number of internal loop iterations that we've done so far.</div><div class="ttdef"><b>Definition:</b> sac.h:325</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a96f852dfca500689684313d3cb7f84b1"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">pcl::SampleConsensus&lt; WeightSACPointType &gt;::model_coefficients_</a></div><div class="ttdeci">Eigen::VectorXf model_coefficients_</div><div class="ttdoc">The coefficients of our model computed directly from the model found.</div><div class="ttdef"><b>Definition:</b> sac.h:319</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_aa1c52d7d8be8f058feac1f9241bf305e"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">pcl::SampleConsensus&lt; WeightSACPointType &gt;::threshold_</a></div><div class="ttdeci">double threshold_</div><div class="ttdoc">Distance to model threshold.</div><div class="ttdef"><b>Definition:</b> sac.h:328</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_aa4953d080c1ab4223cde8ff8d8cabc52"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">pcl::SampleConsensus&lt; WeightSACPointType &gt;::sac_model_</a></div><div class="ttdeci">SampleConsensusModelPtr sac_model_</div><div class="ttdoc">The underlying data model used (i.e. what is it that we attempt to search for).</div><div class="ttdef"><b>Definition:</b> sac.h:310</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">pcl::SampleConsensus&lt; WeightSACPointType &gt;::max_iterations_</a></div><div class="ttdeci">int max_iterations_</div><div class="ttdoc">Maximum number of iterations before giving up.</div><div class="ttdef"><b>Definition:</b> sac.h:331</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a5a291239e9d29732e29919adc43f7ace"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a291239e9d29732e29919adc43f7ace">&#9670;&nbsp;</a></span>getBestScore()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classpcl_1_1_c_p_c_segmentation.html">pcl::CPCSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::WeightedRandomSampleConsensus::getBestScore </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the best score </p>
<dl class="section return"><dt>返回</dt><dd>The best score found. </dd></dl>
<div class="fragment"><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;          {</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            <span class="keywordflow">return</span> (<a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#aff0d5c9c04a5d9dee5b66f44c04303ec">best_score_</a>);</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;          }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a6313e39510545b961cfbed0373b7bbde"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6313e39510545b961cfbed0373b7bbde">&#9670;&nbsp;</a></span>setWeights()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_c_p_c_segmentation.html">pcl::CPCSegmentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::WeightedRandomSampleConsensus::setWeights </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; double &gt; &amp;&#160;</td>
          <td class="paramname"><em>weights</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>directed_weights</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the weights for the input points </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">weights</td><td>Weights for input samples. Negative weights are counted as penalty. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;          {</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            <span class="keywordflow">if</span> (weights.size () != <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#ac8f5af30b240aa1d7c21082ef2f84ed7">full_cloud_pt_indices_</a>-&gt;size ())</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;            {</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;              PCL_ERROR (<span class="stringliteral">&quot;[pcl::WeightedRandomSampleConsensus::setWeights] Cannot assign weights. Weight vector needs to have the same length as the input pointcloud\n&quot;</span>);</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;              <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            }</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a5f272fa6787532bbe7a7f14ef40f79d6">weights_</a> = weights;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a690b982ca4e9efbc8cc8bfd1954db4dc">model_pt_indices_</a>-&gt;clear ();</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; weights.size (); ++i)</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            {</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;              <span class="keywordflow">if</span> (weights[i] &gt; std::numeric_limits&lt;double&gt;::epsilon ())</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#a690b982ca4e9efbc8cc8bfd1954db4dc">model_pt_indices_</a>-&gt;push_back (i);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            }</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;            <a class="code" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html#afdf74f8e57d514108d59d16829b5b446">use_directed_weights_</a> = directed_weights;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;          }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>segmentation/include/pcl/segmentation/<a class="el" href="cpc__segmentation_8h_source.html">cpc_segmentation.h</a></li>
<li>segmentation/include/pcl/segmentation/impl/<a class="el" href="cpc__segmentation_8hpp_source.html">cpc_segmentation.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_c_p_c_segmentation.html">CPCSegmentation</a></li><li class="navelem"><a class="el" href="classpcl_1_1_c_p_c_segmentation_1_1_weighted_random_sample_consensus.html">WeightedRandomSampleConsensus</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
